]> dgit.raspbian.org Git - gnome-shell.git/commit
overviewControls: Bind state adjustment signals to parent lifetime
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Fri, 31 Oct 2025 03:57:50 +0000 (04:57 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 24 Nov 2025 13:42:59 +0000 (14:42 +0100)
commit45c3b7e1a5130cea94f351b9914e09010680d91e
tree7c5fa79b668f80bc820fa8c078d67e21d2d82fe4
parentc1092d4b3e0cab3f89db8ba7636eedea184ddba8
overviewControls: Bind state adjustment signals to parent lifetime

On tests shutdown we were sometimes getting this error:

  ** Message: 09:29:27.494: Shutting down GNOME Shell

  (gnome-shell:3728700): Gjs-CRITICAL **: 09:29:27.545:
  JS ERROR: TypeError: this._workspacesDisplay is undefined
  _update@resource:///org/gnome/shell/ui/overviewControls.js:599:37
  _initializeUI/<@resource:///org/gnome/shell/ui/main.js:279:14

Which after using the arrow function becomes:

  (gnome-shell:3731979): Gjs-CRITICAL **: 09:30:05.419:
  JS ERROR: TypeError: this._workspacesDisplay is undefined
  _update@resource:///org/gnome/shell/ui/overviewControls.js:599:37
  _init/<@resource:///org/gnome/shell/ui/overviewControls.js:343:67
  _initializeUI/<@resource:///org/gnome/shell/ui/main.js:279:14

This is because the state adjustement object lifetime is not bound to
the ControlsManager, and so we were potentially accessing to invalid
data

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3943>
(cherry picked from commit 935c5a0c540237ea7d1b8e38141577ac20669662)
js/ui/overviewControls.js